package com.smallrig.mall.template.chain;

import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
import org.apache.commons.chain.Filter;
import org.springframework.stereotype.Service;

@Service
public class OrderSubmitSaveCommand implements Command, Filter {

    @Override
    public boolean execute(Context context) throws Exception {
        OrderContext orderContext = (OrderContext) context;
        System.out.println("保存订单："+orderContext);
        return false;
    }

    @Override
    public boolean postprocess(Context context, Exception e) {
        return false;
    }

}
